package com.hbnu;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        FlowerShopService service = new FlowerShopService();
        Scanner sc = new Scanner(System.in);
        while (true) {
            System.out.println("\n===== 🌹 花店管理系统 =====");
            System.out.println("1. 查看花卉库存");
            System.out.println("2. 添加花卉");
            System.out.println("3. 查看客户列表");
            System.out.println("4. 添加客户");
            System.out.println("0. 退出系统");
            System.out.print("请选择操作: ");

            int choice = sc.nextInt();
            switch (choice) {
                case 1:
                    service.showAllFlowers();
                    break;
                case 2:
                    service.addFlower();
                    break;
                case 3:
                    service.listCustomers(); break;
                case 4:
                    service.addCustomer(); break;

                case 0:
                    System.out.println("👋 再见，欢迎下次光临花店！");
                    System.exit(0);
                default:
                    System.out.println("❌ 无效选择，请重新输入！");
            }
        }
    }
}

